﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ResolverFactoryContracts.cs" company="Rolosoft Ltd">
//   © Rolosoft Ltd
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

#region License

// Copyright 2013 Rolosoft Ltd
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

namespace Rsft.Net.Dns.Interfaces
{
    #region Usings

    using System.Diagnostics.Contracts;

    #endregion

    /// <summary>
    ///     The resolver factory contracts.
    /// </summary>
    [ContractClassFor(typeof(IResolverFactory))]
    internal abstract class ResolverFactoryContracts : IResolverFactory
    {
        #region Public Methods and Operators

        /// <summary>
        ///     The create reader factory.
        /// </summary>
        /// <returns>
        ///     The <see cref="IRecordReaderFactory" />.
        /// </returns>
        public virtual IRecordReaderFactory CreateReaderFactory()
        {
            Contract.Ensures(Contract.Result<IRecordReaderFactory>() != null);
            return default(IRecordReaderFactory);
        }

        /// <summary>
        /// Creates the cache factory.
        /// </summary>
        /// <returns>
        /// The <see cref="ICacheFactory" />
        /// </returns>
        public virtual ICacheFactory CreateCacheFactory()
        {
            Contract.Ensures(Contract.Result<ICacheFactory>() != null);
            return default(ICacheFactory);
        }

        /// <summary>
        /// Creates the logger factory.
        /// </summary>
        /// <returns>
        /// The <see cref="ILoggerFactory" />.
        /// </returns>
        public virtual ILoggerFactory CreateLoggerFactory()
        {
            Contract.Ensures(Contract.Result<ILoggerFactory>() != null);
            return default(ILoggerFactory);
        }

        /// <summary>
        /// Creates the configuration factory.
        /// </summary>
        /// <returns>
        /// The <see cref="IConfigurationFactory" />.
        /// </returns>
        public virtual IConfigurationFactory CreateConfigurationFactory()
        {
            Contract.Ensures(Contract.Result<IConfigurationFactory>() != null);
            return default(IConfigurationFactory);
        }

        /// <summary>
        ///     The create resolver.
        /// </summary>
        /// <returns>
        ///     The <see cref="IResolver" />.
        /// </returns>
        public virtual IResolver CreateResolver()
        {
            Contract.Ensures(Contract.Result<IResolver>() != null);
            return default(IResolver);
        }

        /// <summary>
        /// The create resolver.
        /// </summary>
        /// <param name="configuration">The configuration.</param>
        /// <returns>
        /// The <see cref="IResolver" />.
        /// </returns>
        public virtual IResolver CreateResolver(IConfiguration configuration)
        {
            Contract.Ensures(Contract.Result<IResolver>() != null);
            return default(IResolver);
        }

        #endregion
    }
}